<?php include '../admin_head.php';
//获取分类信息
	$list = $_GET['list'];
	$pid = $_GET['pid'];
	$id = $_GET['id'];
	
	$sql = "select name from ".PRE."category where id='{$pid}'";
	$pcate = mysql_fetch_assoc(mysql_query($sql));
	if($pcate == null) $pcate['name'] = '顶级分类';
	
	$sql = "select name from ".PRE."category where id='{$id}'";
	$cate = mysql_fetch_assoc(mysql_query($sql));
	

?>
	
		<div class="admin_main_nav">分类管理&gt;&gt;添加分类</div>
		<div id="admin_addcate" class="admin_form admin_main_index">
		<div class="user_index_title"></div>
			<table width="500">
			<form action="action.php?a=edit&list=<?php echo $list ?>" method="post">
			<input type="hidden" value="<?php echo $id?>"  name="id" />
			<input type="hidden" value="<?php echo $pid?>"  name="pid" />
				<tr>
					<th>所属分类：</th>
					<td><?php echo $pcate['name']?></td>
				</tr>
				<tr>
					<th>新分类名称：</th>
					<td><input type="text" name="name" value="<?php echo $cate['name'] ?>"/></td>
				</tr>
				<tr>
					<td colspan="2" class="submit"><input type="submit" value="更新分类" /></td>
				</tr>
			</form>
		</table>
		</div>

		
<?php include '../admin_footer.php';?>
